package net.bo;

import java.util.Calendar;

import net.ko.kobject.KObject;
import net.ko.persistence.annotation.Entity;
import net.ko.persistence.annotation.Table;
import net.ko.persistence.annotation.Transient;
import net.ko.kobject.KListObject;


/**
* Classe KUtilisateur
*/
@SuppressWarnings("serial")
@Entity
@Table(name="utilisateur")
public class KUtilisateur extends KObject {
	private int idCompte;
	private java.sql.Timestamp inscription;
	private String login;
	private String mail;
	private String nom;
	private String password;
	@Transient
	private String confirmation;
	private KCompte compte;
	private KListObject<KAffectation> affectations;
	private KListObject<KDemande> demandes;
	private KListObject<KDroit> droits;
	private KListObject<KFtester> ftesters;
	private KListObject<KPlan> plans;
	private KListObject<KTemps> tempss;
	private KListObject<KValidation> validations;
	private KListObject<KConfiguration> configurations;
	private KListObject<KPlan> plansValides;


	public KUtilisateur() {
		super();
		//hasMany(KValidation.class);hasMany(KTemps.class);hasMany(KPlan.class);hasMany(KParametre.class);hasMany(KFtester.class);hasMany(KDroit.class);hasMany(KDemande.class);hasMany(KAffectation.class);
		idCompte=1;
		configurations=new KListObject<>(KConfiguration.class);
		inscription=new java.sql.Timestamp(Calendar.getInstance().getTimeInMillis());
		belongsTo(KCompte.class);
		hasManyBelongsTo(KConfiguration.class, KParametre.class);
		hasAndBelongsToMany(KValidation.class,"plansValides",KPlan.class);
		hasMany(KPlan.class);
	}
	/**
	 * return the value of idCompte
	 * @return idCompte
	 */
	public int getIdCompte(){
		return this.idCompte;
	}
	/**
	 * return the value of inscription
	 * @return inscription
	 */
	public java.sql.Timestamp getInscription(){
		return this.inscription;
	}
	/**
	 * return the value of login
	 * @return login
	 */
	public String getLogin(){
		return this.login;
	}
	/**
	 * return the value of mail
	 * @return mail
	 */
	public String getMail(){
		return this.mail;
	}
	/**
	 * return the value of nom
	 * @return nom
	 */
	public String getNom(){
		return this.nom;
	}
	/**
	 * return the value of password
	 * @return password
	 */
	public String getPassword(){
		return this.password;
	}
	/**
	 * return the value of compte
	 * @return compte
	 */
	public KCompte getCompte(){
		return this.compte;
	}
	/**
	 * return the value of affectations
	 * @return affectations
	 */
	public KListObject<KAffectation> getAffectations(){
		return this.affectations;
	}
	/**
	 * return the value of demandes
	 * @return demandes
	 */
	public KListObject<KDemande> getDemandes(){
		return this.demandes;
	}
	/**
	 * return the value of droits
	 * @return droits
	 */
	public KListObject<KDroit> getDroits(){
		return this.droits;
	}
	/**
	 * return the value of ftesters
	 * @return ftesters
	 */
	public KListObject<KFtester> getFtesters(){
		return this.ftesters;
	}

	/**
	 * return the value of plans
	 * @return plans
	 */
	public KListObject<KPlan> getPlans(){
		return this.plans;
	}
	/**
	 * return the value of tempss
	 * @return tempss
	 */
	public KListObject<KTemps> getTempss(){
		return this.tempss;
	}
	/**
	 * return the value of configurations
	 * @return configurations
	 */
	public KListObject<KConfiguration> getConfigurations(){
		return this.configurations;
	}
	/**
	 * return the value of validations
	 * @return validations
	 */
	public KListObject<KValidation> getValidations(){
		return this.validations;
	}

	/**
	 * set the value of idCompte
	 * @param aIdCompte
	 */
	public void setIdCompte(int aIdCompte){
		this.idCompte=aIdCompte;
	}
	/**
	 * set the value of inscription
	 * @param aInscription
	 */
	public void setInscription(java.sql.Timestamp aInscription){
		this.inscription=aInscription;
	}
	/**
	 * set the value of login
	 * @param aLogin
	 */
	public void setLogin(String aLogin){
		this.login=aLogin;
	}
	/**
	 * set the value of mail
	 * @param aMail
	 */
	public void setMail(String aMail){
		this.mail=aMail;
	}
	/**
	 * set the value of nom
	 * @param aNom
	 */
	public void setNom(String aNom){
		this.nom=aNom;
	}
	/**
	 * set the value of password
	 * @param aPassword
	 */
	public void setPassword(String aPassword){
		this.password=aPassword;
	}
	/**
	 * set the value of compte
	 * @param aCompte
	 */
	public void setCompte(KCompte aCompte){
		this.compte=aCompte;
	}
	/**
	 * set the value of affectations
	 * @param aAffectations
	 */
	public void setAffectations(KListObject<KAffectation> aAffectations){
		this.affectations=aAffectations;
	}
	/**
	 * set the value of demandes
	 * @param aDemandes
	 */
	public void setDemandes(KListObject<KDemande> aDemandes){
		this.demandes=aDemandes;
	}
	/**
	 * set the value of droits
	 * @param aDroits
	 */
	public void setDroits(KListObject<KDroit> aDroits){
		this.droits=aDroits;
	}
	/**
	 * set the value of ftesters
	 * @param aFtesters
	 */
	public void setFtesters(KListObject<KFtester> aFtesters){
		this.ftesters=aFtesters;
	}

	/**
	 * set the value of plans
	 * @param aPlans
	 */
	public void setPlans(KListObject<KPlan> aPlans){
		this.plans=aPlans;
	}
	/**
	 * set the value of tempss
	 * @param aTempss
	 */
	public void setTempss(KListObject<KTemps> aTempss){
		this.tempss=aTempss;
	}
	/**
	 * set the value of validations
	 * @param aValidations
	 */
	public void setValidations(KListObject<KValidation> aValidations){
		this.validations=aValidations;
	}
	public KListObject<KPlan> getPlansValides() {
		return plansValides;
	}
	public void setPlansValides(KListObject<KPlan> plansValides) {
		this.plansValides = plansValides;
	}
	@Override
	public String toString() {
		return nom;
	}
}